#ifndef SHOOTER_SUBSYSTEM_H
#define SHOOTER_SUBSYSTEM_H

#include "WPILib.h"
#include "RobotSubsystem.h"
#include "OperatorButton.h"
#include "SonarSensor.h"
#include "RollerSubsystem.h"
#include "ProngsSubsystem.h"

class ShooterSubsystem : public RobotSubsystem
{
public:
	enum ShooterState
	{
		kLoad,
		kFire
	};
	
	ShooterSubsystem();
	~ShooterSubsystem();
	
	virtual void DoAutonomousInit(void);
	virtual void DoTeleopInit(void);
	virtual void DoDisabledInit(void);
	virtual void DoAutonomousPeriodic(void);
	virtual void DoTeleopPeriodic(void);
	virtual void DoDisabledPeriodic(void);
	void SetShooterState(ShooterState state);

	void SetSubsystems(ProngsSubsystem *prongs, RollerSubsystem *roller);
private:
	Jaguar *m_shooterJaguar;
	OperatorButton *m_loadButton;
	OperatorButton *m_unloadButton;
	OperatorButton *m_fireButton;
	OperatorButton *m_manualOverride;
	DigitalInput *m_shooterProx;
	SonarSensor *m_sonar;
	ShooterState m_state;
	void ShooterMotorControl();
	void ManualShooter();
	
	ProngsSubsystem *m_prongs;
	RollerSubsystem *m_roller;
};

#endif
